(function (window) {
    var ALI_NVC_DEPEND_LIB = '//g.alicdn.com/sd/nvc/1.1.112/guide.js',
        LIB_ELEMENT_ID = 'ali-nvc-dep-id',
        APP_KEY = 'FFFF0N00000000009560';

    window.nvcInit = function (opts) {
        window.NVC_Opt = {
            appkey: opts.NVC_APP_KEY || APP_KEY,
            scene: opts.scene || 'ic_message',
            trans: opts.trans || {},
            elements: [
                "//img.alicdn.com/tfs/TB17cwllsLJ8KJjy0FnXXcFDpXa-50-74.png",
                "//img.alicdn.com/tfs/TB17cwllsLJ8KJjy0FnXXcFDpXa-50-74.png"
            ],
            popUp: Boolean(opts.popUp),
            renderTo: opts.renderTo || '',
            width: opts.width,
            height: opts.height,
            nvcCallback: function (data) {
                typeof opts.nvcCallback === "function" && opts.nvcCallback(data);
            },
            bg_back_prepared: "//img.alicdn.com/tps/TB1skE5SFXXXXb3XXXXXXXXXXXX-100-80.png",
            bg_front: "",
            obj_ok: "//img.alicdn.com/tfs/TB1rmyTltfJ8KJjy0FeXXXKEXXa-50-74.png",
            bg_back_pass: "//img.alicdn.com/tfs/TB1KDxCSVXXXXasXFXXXXXXXXXX-100-80.png",
            obj_error: "//img.alicdn.com/tfs/TB1q9yTltfJ8KJjy0FeXXXKEXXa-50-74.png",
            bg_back_fail: "//img.alicdn.com/tfs/TB1w2oOSFXXXXb4XpXXXXXXXXXX-100-80.png",
            upLang:{"cn":{
                    _ggk_guide: "请摁住鼠标左键，刮出两面盾牌",
                    _ggk_success: "恭喜您成功刮出盾牌<br/>继续下一步操作吧",
                    _ggk_loading: "加载中",
                    _ggk_fail: ["呀，盾牌不见了<br/>请","javascript:noCaptcha.reset()","再来一次","或","https://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN","反馈问题"],
                    _ggk_action_timeout: ["我等得太久啦<br/>请","javascript:noCaptcha.reset()","再来一次","或","https://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN","反馈问题"],
                    _ggk_net_err: ["网络实在不给力<br/>请","javascript:noCaptcha.reset()","再来一次","或","https://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN","反馈问题"],
                    _ggk_too_fast: ["您刮得太快啦<br/>请","javascript:noCaptcha.reset()","再来一次","或","https://survey.taobao.com/survey/QgzQDdDd?token=%TOKEN","反馈问题"]
                }
            }
        };
        document.body.appendChild(function () {
            var e = document.createElement('script');
            e.id = LIB_ELEMENT_ID;
            e.src = ALI_NVC_DEPEND_LIB + '?' + Math.floor((new Date()).valueOf() / 1000 / 3600); // 1小时刷新一次文件
            return e;
        }());
    };
})(window);